package com.echat.commonlib.exception.exc;

import com.echat.commonlib.constant.ErrorCode;
import com.echat.commonlib.exception.exc.base.EchatException;
import lombok.Getter;

/**
 * Created by chenmohan on 2018/08/30
 *
 * @description
 */
public class ValidateFailedException extends EchatException {

    @Getter
    private Integer code;

    public ValidateFailedException(Integer code, String msg) {
        super(code, msg);
        this.code = code;
    }

    public ValidateFailedException(Integer code) {
        super(code, "参数校验错误!");
    }

    public ValidateFailedException(String msg) {
        this(ErrorCode.DEFAULT_PARAMETER_VALIDATE_FAILED, msg);
    }
}
